package com.veo.mapper;

import com.veo.entity.Department;
import org.apache.ibatis.annotations.*;

//@Mapper
public interface DepartmentMapper {

    @Select("select * from department where id=#{id}")
    Department getDeptById(Integer id);

    @Delete("delete from department where id=#{id}")
    int delDeptById(Integer id);

    @Options(useGeneratedKeys = true,keyProperty = "id")
    @Insert("insert into department(departmentName) values(#{department_name})")
    int insertDept(Department department);
    
    @Update("update department set departmentName=#{department_name} where id=#{id}")
    int updateDept(Department department);
}
